import request from "../utils/request";

// 学生查看全部案例
export const allCase = data => {
    return request({
        method: 'POST',
        url: '/recipe/userFindPageRecipe',
        data
    })
}
//查看案例提交次数
export const caseNum = () => {
    return request({
        method: 'POST',
        url: '/recipe/recipeNum'
    })
}
//删除案例
export const deleteCaseById = id => {
    return request({
        method: 'GET',
        url: '/recipe/deleteRecipe?id=' + id
    })
}
//更新案例版本
export const editCase = data => {
    return request({
        method: 'POST',
        url: '/recipe/updateRecipe',
        data
    })
}
//案例历史版本
export const historyCaseById = id => {
    return request({
        method: 'GET',
        url: '/recipe/findRecipeLogById?id=' + id
    })
}
//新增案例
export const addCase = data => {
    return request({
        method: 'POST',
        url: '/recipe/addRecipe',
        data
    })
}
//教师查看系统案例
export const teacherCase = data => {
    return request({
        method: 'POST',
        url: '/recipe/findPageRecipe',
        data
    })
}
//教师查看学生案例
export const studentCase = data => {
    return request({
        method: 'POST',
        url: '/recipe/findPageStudentRecipe',
        data
    })
}
//审核案例
export const applyCase = data => {
    return request({
        method: 'POST',
        url: '/recipe/updateStudentRecipe',
        data
    })
}
